<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    
    </style>
</head>
<body>
    <div>
        <!-- 使用单选框 ,name命名要一致 不然会都可以选中 -->
        <h4>请选择性别</h4>
        <p><label for="male">男:</label><input type="radio" name="sex" id="male"> </p>
        <p><label for="female">女:</label><input type="radio" name="sex" id="male"></p>
    </div>    
</body>
</html>